package com.jhopesoft.framework.dao.entity.common;
// Generated 2022-04-01 18:16:18 by Quick build System

import java.io.Serializable;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.DynamicUpdate;

/**
 *
 * 国民经济行业(PubIndustry) generated by Quick Build System 
 *
 * 了解快速架构系统 https://github.com/jfok1972
 *
 * @author 蒋锋 jfok1972@qq.com
 *
*/
@Entity
@DynamicUpdate
@Table(name = "pub_industry")
public class PubIndustry implements Serializable {

	/** 代码 */
	private String industryId;
	/** 上级代码 */
	private PubIndustry pubIndustry;
	/** 行业名称 */
	private String industryName;
	private Set<PubIndustry> pubIndustrys = new LinkedHashSet<PubIndustry>(0);

	public PubIndustry() {
	}

	@Id

	@Column(name = "industry_id_", unique = true, nullable = false, length = 10)
	public String getIndustryId() {
		return this.industryId;
	}

	public void setIndustryId(String industryId) {
		this.industryId = industryId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pid_")
	public PubIndustry getPubIndustry() {
		return this.pubIndustry;
	}

	public void setPubIndustry(PubIndustry pubIndustry) {
		this.pubIndustry = pubIndustry;
	}

	@Column(name = "industry_name_", nullable = false, length = 50)
	public String getIndustryName() {
		return this.industryName;
	}

	public void setIndustryName(String industryName) {
		this.industryName = industryName;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pubIndustry")
	public Set<PubIndustry> getPubIndustrys() {
		return this.pubIndustrys;
	}

	public void setPubIndustrys(Set<PubIndustry> pubIndustrys) {
		this.pubIndustrys = pubIndustrys;
	}

}
